package com.sunzn.media.library.port;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

public class MediaViewModel extends ViewModel {

    private MutableLiveData<Long> mAction;

    public MutableLiveData<Long> getAction() {
        if (mAction == null) {
            mAction = new MutableLiveData<>();
        }
        return mAction;
    }

    public void setAction(Long action) {
        if (mAction != null) {
            mAction.setValue(action);
        }
    }

    @Override
    protected void onCleared() {
        super.onCleared();
        mAction = null;
    }

}
